package com.example.nonacademic_education.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.nonacademic_education.data.request.Graduate;
import com.example.nonacademic_education.data.request.LoginR;
import com.example.nonacademic_education.data.request.StudentExcelVo;
import com.example.nonacademic_education.data.request.StudentList;
import com.example.nonacademic_education.data.response.StudentDto;
import com.example.nonacademic_education.entity.Admin;
import com.example.nonacademic_education.entity.Student;
import com.example.nonacademic_education.util.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

/**
 * @Author:yanghua
 * @Date:2023/4/2 11:18
 */

public interface StudentService extends IService<Student> {
    /**
     * 通过身份证查毕业信息
     * @param identityCardId
     * @return
     */
    R getInformFormID(String  identityCardId,Long studentId);

    /**
     * 添加一个学员
     * @param student
     * @return
     */
    R addStudent(StudentDto student);

    /**
     * 学员毕业证书编号
     * @param certificateNo
     * @param identityCardId
     * @return
     */
    R toGraduate(String certificateNo, String identityCardId);

    R getStudentList(StudentList studentList);

    R deleteById(Long id);

    R updateStudent(Student student);

    void getExcelTemplate(HttpServletResponse response) throws IOException;

    R importStudents(MultipartFile file, Long classId, Long enrollmentTime, Long graduateTime);

    R graduateStudents(Graduate graduate);

    R getGraduateInfo(Long classId);

    R login(LoginR admin, HttpServletRequest request);

    R uploadHeadImage(Student student);

    R resetPassword(Student student);

    R uploadIdentificationPhoto(MultipartFile file);

    void exportStatisticsExcel(StudentExcelVo studentExcelVo,HttpServletResponse response) throws IOException;

    R importStudentsGraduated(MultipartFile file, Long classId, Long enrollmentTime, Long graduateTime, String trainingInfo, Long creationTime);

    R resetStudentPassword(String identityCardId);

    R enableAccount(String id, Integer able);
}
